package javaBase.FatherAndSon;

/**
 * @program: jvm
 * @description
 * @author: tkk fendoukaoziji
 * @create: 2019-04-10 19:39
 **/
public class Test {
    public static void main(String[] args) {

        Father fa1=new Father();
        Father son2=new Son();
        System.out.println(fa1.a);//1
        System.out.println(son2.a);//?此处是父亲的1        左边是什么类型  成员变量就是哪边的值  多态调用同名成员变量结果是父类
        System.out.println(fa1.getA());//1
        System.out.println(son2.getA());//2
    }


}
